<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include::header('违章条款类型')"/>
    <style>
        #febs-peccancyClauseRule .layui-table-click{
            background-color: #dbfbf0 !important;
        }
    </style>
</head>
<body class="febs-container" id="febs-peccancyClauseRule">
<div class="febs-body layui-fluid" lay-title="违章条款类型">
    <div class="febs-body-search">
        <form class="layui-form layui-table-form" lay-filter="peccancyClauseRule-table-form"
              id="peccancyClauseRule-table-form">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="layui-form-item">
                        <div class="layui-inline" id="post-tenant" th:classappend="${hasHeadCompanyRole } ? '' : 'febs-hide'">
                            <label class="layui-form-label layui-form-label-sm">公司名称</label>
                            <div class="layui-input-inline" style="width:280px;">
                                <select name="tenantId" id="tenantId" lay-search="" t>
                                    <option th:each="item:${tenantList }"
                                            th:value="${item.tenantId}" th:text="${item.tenantName}"
                                            th:selected="${tenantId ==item.tenantId}">
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label layui-form-label-sm">条款名称</label>
                            <div class="layui-input-inline" style="width:190px;">
                                <input type="text" name="clauseName" autocomplete="off" class="layui-input" placeholder="请输入条款名称">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label layui-form-label-sm">适用范围</label>
                            <div class="layui-input-inline" >
                                <select name="useScope" id="useScope">
                                    <option value="">请选择</option>
                                    <option value="1">本工</option>
                                    <option value="2">外包</option>
                                    <option value="3">外协</option>
                                    <option value="4">承包队</option>
                                    <option value="10">全部</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label layui-form-label-sm">状态</label>
                            <div class="layui-input-inline" >
                                <select name="status" id="status">
                                    <option value=""></option>
                                    <option value="1">启用</option>
                                    <option value="0">禁用</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <div id="query" class="layui-btn">
                                <em class="layui-icon">&#xe615;</em> 查询
                            </div>
                            <div id="selectPeccancyClause" class="layui-btn">
                                <em class="layui-icon">&#xe615;</em> 选择违章条款
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <div class="layui-row layui-col-space15" style="margin: 0 -7.5px">
        <div class="layui-col-sm12 layui-col-xs12 layui-col-md4 layui-col-lg4" style="padding: 0 7.5px;">
            <div class="febs-table-full">
                <table lay-filter="peccancyClauseTable" name="peccancyClauseTable" lay-data="{id: 'peccancyClauseTable'}"></table>
            </div>
        </div>
        <div class="layui-col-sm12 layui-col-xs12 layui-col-md8 layui-col-lg8" style="padding: 0 7.5px;">
            <div class="febs-table-full">
                <table lay-filter="peccancyClauseRuleTable" name="peccancyClauseRuleTable"
                       lay-data="{id: 'peccancyClauseRuleTable'}"></table>
            </div>
        </div>
    </div>
</div>
<th:block th:include="include::foot"/>

<script th:src="@{/febs/js/peccancy/peccancyClauseRule/peccancyClauseRuleList.js(v=1)}"></script>
<script type="text/html" id="peccancyClause-toolbar">
    <div lay-event="add" class="layui-btn layui-btn-sm" shiro:hasPermission="peccancyClause:add">
        <em class="layui-icon">&#xe654;</em> 新增
    </div>
</script>
<script type="text/html" id="peccancyClause-option">
    <span shiro:lacksPermission="peccancyClause:edit,peccancyClause:delete">
        <span class="layui-badge-dot febs-bg-orange"></span> 无权限
        </span>
    <button type="button" class="layui-btn layui-btn-xs layui-btn-primary layui-border-orange" lay-event="set" shiro:hasPermission="baseContractor:update">
        <i class="layui-icon layui-icon-set">设置</i>
    </button>
    <button type="button" class="layui-btn layui-btn-xs  layui-btn-primary layui-border-orange" lay-event="edit" shiro:hasPermission="peccancyClause:edit">
        <i class="layui-icon layui-icon-edit">编辑</i>
    </button>
    <button type="button" class="layui-btn layui-btn-xs  layui-btn-primary layui-border-red" lay-event="del" shiro:hasPermission="peccancyClause:delete">
        <i class="layui-icon layui-icon-delete">删除</i>
    </button>
</script>

<script type="text/html" id="peccancyClauseRule-toolbar">
    <div class="layui-form-item" style="margin-bottom: 0px">
        <div class="layui-inline">
            <label class="layui-form-label layui-form-label-sm" style="width: auto;">条款编号</label>
            <div class="layui-input-inline" style="width: 200px;">
                <input type="text" name="clauseNo" autocomplete="off" class="layui-input" placeholder="请输入条款编号">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label layui-form-label-sm" style="width: auto;">处理形式</label>
            <div class="layui-input-inline" >
                <select name="disposeForm" id="disposeForm">
                    <option value="">请选择处理形式</option>
                    <option th:each="item:${disposeFormList}" th:value="${item.itemCode}" th:text="${item.itemName}"></option>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label layui-form-label-sm" style="width: auto;">规则状态</label>
            <div class="layui-input-inline" style="width: 200px;">
                <select name="ruleStatus" id="ruleStatus">
                    <option value="1">启用</option>
                    <option value="0">禁用</option>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <button id="ruleQuery" lay-event="ruleQuery" type="button" class="layui-btn layui-btn-sm"
                    shiro:hasPermission="peccancyClauseRule:view">
                <em class="layui-icon">&#xe615;</em> 查询
            </button>
        </div>

        <div class="layui-inline">
            <button id="ruleAdd" lay-event="ruleAdd" type="button" class="layui-btn layui-btn-sm"
                    shiro:hasPermission="peccancyClauseRule:add">
                <em class="layui-icon">&#xe654;</em> 新增奖惩规则
            </button>
        </div>
    </div>

</script>
<script type="text/html" id="peccancyClauseRule-option">
    <span shiro:lacksPermission="peccancyClauseRule:edit,peccancyClauseRule:delete">
        <span class="layui-badge-dot febs-bg-orange"></span> 无权限
        </span>
    <button type="button" class="layui-btn layui-btn-xs layui-btn-primary layui-border-orange" lay-event="edit" shiro:hasPermission="peccancyClauseRule:edit">
        <i class="layui-icon layui-icon-edit"></i>编辑</button>
    <button type="button" class="layui-btn layui-btn-xs layui-btn-primary layui-border-red" lay-event="del" shiro:hasPermission="peccancyClauseRule:delete">
        <i class="layui-icon layui-icon-delete"></i>删除</button>
</script>
<script type="text/html" id="statusOption">
    <input type="checkbox" name="statusOption" value="{{d.status}}" lay-skin="switch" lay-text="启用|禁用"
           lay-filter="statusOption" lay-event="statusEvent" {{ d.status== '1' ? 'checked' : '' }} />
</script>
<script type="text/html" id="statusOptionRule">
    <input type="checkbox" name="statusOption" value="{{d.status}}" lay-skin="switch" lay-text="启用|禁用"
           lay-filter="statusOptionRule" lay-event="statusEvent" {{ d.status== '1' ? 'checked' : '' }} />
</script>
<script data-th-inline="javascript">
    var disposeFormList = [[${disposeFormList}]];
</script>
</body>
</html>